/*
 * @Autor: dingxiaolin
 * @Date: 2021-05-24 09:18:34
 * @LastEditors: dingxiaolin
 * @LastEditTime: 2021-05-25 10:41:51
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue()],
    base: '/h5/',
    resolve: {
        alias: {
            '@': path.resolve(__dirname, './src'),
        },
    },
    css: {
        preprocessorOptions: {
            scss: {
                // additionalData: `$theme: #409eff;`
                additionalData: `@import "./src/style/variables.scss";`
            }
        }
    },
    server: {
        host: "0.0.0.0",
        port: 3000,
        proxy: {
            '/api': {
                target: 'https://test-wode.vip56.cn', // 接口域名
                changeOrigin: true,
                rewrite: path => path.replace(/^\/api/, '/api')
            },
        },
    },
    build: {
        outDir: "dist",
    },
})
